#include "slist.h"
void test1() {
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListPrint(plist);
	SListPushFront(&plist, 50);
	SListPushFront(&plist, 40);
	SListPushFront(&plist, 30);
	SListPushFront(&plist, 20);
	SListPushFront(&plist, 10);
	SListPrint(plist);
	SListPopBack(&plist);
	SListPopBack(&plist);
	SListPopBack(&plist);
	SListPrint(plist);

}

void test2() {
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListNode* find = SListFind(plist, 3);
	SListInsertAfter(find, 30);
	SListPrint(plist);
}

void test3() {
	SListNode* plist = NULL;
	SListPushBack(&plist, 1);
	SListPushBack(&plist, 2);
	SListPushBack(&plist, 3);
	SListPushBack(&plist, 4);
	SListPushBack(&plist, 5);
	SListNode* find = SListFind(plist, 3);
	SListEraseAfter(find);
	SListPrint(plist);
	SListDestroy(plist);
	plist = NULL;
}
int main() {
	test3();
	return 0;
}